package com.fast.user.model.dept;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.fast.base.db.model.Commnent;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 部门表
 * 
 * @author Administrator
 */
@Entity
@Table(name = "t_dv_Department")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Department implements java.io.Serializable {

	/**
	 * serialVersionUID:提示:.
	 * 
	 * @since JDK 1.7
	 */
	private static final long serialVersionUID = -2343856838262236965L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false, length = 10)
	private int id;
	private String uuid = "";
	private String parentUUID = "";
	private String departmentName = "";
	private String departmentDesc = "";
	private String companyUUID = "";
	private String companyName = "";
	private int orderNumber = 0;

	// 操作信息
	@Commnent("编辑人ID")
	@Column(name = "editor_id", length = 11)
	private int editorId = 0;// 编辑人Id
	@Commnent("编辑人")
	@Column(name = "editor_name", length = 32)
	private String editorName = "";// 编辑人
	@Commnent("编辑时间")
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "edit_time")
	private Date editTime;// 编辑时间
	@Commnent("创建人ID")
	@Column(name = "creater_id", length = 11)
	private int createrId = 0;// 编辑人Id
	@Commnent("创建人")
	@Column(name = "creater", length = 32)
	private String creater = "";// 编辑人
	@Commnent("创建时间")
	@Column(name = "create_time", length = 32)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	@Commnent("删除标识")
	@Column(name = "delete_flag", length = 1)
	private int deleteFlag = 0;// 默认为不删除，1为删除

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public void setEditTime(Date editTime) {
		this.editTime = editTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	

	public int getId() {
		return id;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public Date getEditTime() {
		return editTime;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public Date getCreateTime() {
		return createTime;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getParentUUID() {
		return parentUUID;
	}

	public void setParentUUID(String parentUUID) {
		this.parentUUID = parentUUID;
	}

	public String getDepartmentName() {
		return departmentName;
	}

	public void setDepartmentName(String departmentName) {
		this.departmentName = departmentName;
	}

	public String getDepartmentDesc() {
		return departmentDesc;
	}

	public void setDepartmentDesc(String departmentDesc) {
		this.departmentDesc = departmentDesc;
	}

	public String getCompanyUUID() {
		return companyUUID;
	}

	public void setCompanyUUID(String companyUUID) {
		this.companyUUID = companyUUID;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public int getEditorId() {
		return editorId;
	}

	public void setEditorId(int editorId) {
		this.editorId = editorId;
	}

	public String getEditorName() {
		return editorName;
	}

	public void setEditorName(String editorName) {
		this.editorName = editorName;
	}

	public int getCreaterId() {
		return createrId;
	}

	public void setCreaterId(int createrId) {
		this.createrId = createrId;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}

	public int getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(int orderNumber) {
		this.orderNumber = orderNumber;
	}

	@Override
	public String toString() {
		return "Department [id=" + id + ", uuid=" + uuid + ", parentUUID=" + parentUUID + ", departmentName="
				+ departmentName + ", departmentDesc=" + departmentDesc + ", companyUUID=" + companyUUID
				+ ", companyName=" + companyName + ", orderNumber=" + orderNumber + ", editorId=" + editorId
				+ ", editorName=" + editorName + ", editTime=" + editTime + ", createrId=" + createrId + ", creater="
				+ creater + ", createTime=" + createTime + ", deleteFlag=" + deleteFlag + "]";
	}

}
